#include "stdio.h"
struct date
{
    int yy,mm,dd;
};
void main()
{
    struct date day;
    int i,flag=0,days=0;
    int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    printf("year month day:\n");
    scanf("%d %d %d",&day.yy,&day.mm,&day.dd);
    if((!(day.yy%4)&&day.yy%100)||!(day.yy%400))
    {
        flag=1;
    }
    if(flag)
    {
        month[2]=29;
    }
    for(i=1;i<day.mm;i++)
    {
        days+=month[i];
    }
    days+=day.dd;
    printf("%d",days);
}